import Vue from 'vue'
import Vuex from 'vuex'
import city from './city/city.js'
import user from './user/user.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
	count:window.localStorage.getItem('count') || 0
  },
  mutations: {
	HandleTapCuptrue(state,{type}){
		if(type==='ADD'){
			if(this.state.count === 0){
				window.localStorage.setItem('count',this.state.count)
			}
			this.state.count++
			window.localStorage.setItem('count',this.state.count)
		}else{
			this.state.count--
			window.localStorage.setItem('count',this.state.count)
		}
	}
  },
  actions: {

  },
  modules:{
	  city,
	  user
  }
})
